package com.power.sifa.correction.api;

import com.plf.common.domain.ResponseDTO;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.multipart.MultipartFile;
import com.power.sifa.correction.model.Crw_rule_night;
import com.power.sifa.correction.model.pageInfo.Crw_rule_nightPageInfo;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

/**
 *  夜间活动设置 Feign
 */
public interface ICrw_rule_nightFeign {

    /**
     * 夜间活动设置分页列表
     */
    @PostMapping("/crw_rule_night/list")
    ResponseDTO list(@RequestBody Crw_rule_nightPageInfo crw_rule_nightPageInfo);

    /**
    * 查看夜间活动设置
    */
    @GetMapping("/crw_rule_night/view")
    ResponseDTO view(@RequestParam("id") String id);

    /**
    * 删除夜间活动设置
    */
    @PostMapping("/crw_rule_night/delete")
    ResponseDTO delete(@RequestParam("id") String id);

    ///**
    // * 查看夜间活动设置 复合主键使用
    // */
    //@PostMapping("/crw_rule_night/viewByPK")
    //ResponseDTO viewByPK(@RequestBody Crw_rule_night.Crw_rule_nightPK pk);

    /**
     * 修改或保存夜间活动设置
     */
    @PostMapping("/crw_rule_night/save")
    ResponseDTO save(@RequestBody Crw_rule_night  crw_rule_night);

    ///**
    // * 删除夜间活动设置 复合主键使用
    // */
    //@PostMapping("/crw_rule_night/deleteByPK")
    //ResponseDTO deleteByPK(@RequestBody Crw_rule_night.Crw_rule_nightPK pk);
    
    /**
     * 批量删除夜间活动设置
     */
    @PostMapping("/crw_rule_night/batchDel")
    ResponseDTO batchDel(@RequestParam("ids") String ids);
    
     /**
     * 导出excel
     */
    @PostMapping("/crw_rule_night/output")
    void output(HttpServletResponse response, @RequestBody Crw_rule_nightPageInfo crw_rule_nightPageInfo);
        
     /**
     * 导出excel模板
     */
    @PostMapping("/crw_rule_night/exportExcelTemplate")
    void exportExcelTemplate(HttpServletResponse response);
    
     /**
     *	导入excel
     */
    @PostMapping("/crw_rule_night/importExcel")
    ResponseDTO importExcel(@RequestBody MultipartFile file) throws IOException ;

    /**
     * 修改或保存夜间活动设置及社矫人员信息
     */
    @PostMapping("/crw_rule_night/saveRule")
    ResponseDTO saveRule(@RequestBody Crw_rule_night  crw_rule_night,@RequestParam("personIds")String personIds,@RequestParam("groupIds")String groupIds);

    /**
     * 判断规则名称是否已存在
     */
    @GetMapping("/crw_rule_night/existsRuleName")
    ResponseDTO<Boolean> existsRuleName(@RequestParam("name") String name);
}
